package com.ytjj.qmyx.mall.mapper;

import com.ytjj.qmyx.mall.model.*;
import com.ytjj.qmyx.mall.model.request.UserHelpRequest;
import com.ytjj.qmyx.mall.model.response.*;
import com.ytjj.qmyx.mall.model.vo.UserHelpWorkVo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 *
 *  *
 **/
public interface EvaluationProductDao {

    EvaluationProductInfoResponse findByProductAndProductType(@Param("productId") Integer productId,
                                                              @Param("productType") Integer productType);

    List<Product> queryColumnProductList(@Param("bankerId") Integer bankerId,
                                         @Param("bankerColumnId") Integer bankerColumnId,
                                         @Param("productName") String productName);

    List<Product> queryClearProductList(@Param("bankerId") Integer bankerId, @Param("platformData") String platformData);

    List<Product> queryQualityProductList(@Param("bankerId") Integer bankerId, @Param("platformData") String platformData);

    List<Product> queryZeroProductList(@Param("bankerId") Integer bankerId);

    EvaluationProduct findById(Integer productId);

    int countByUserId(Integer userId);

    HelpWork getHelpWorkInfoByUserId(Integer userId);

    AssistOrderResponse findAssistOrderByUserId(@Param("userId") Integer userId);

    List<AssistOrderResponse>  findAssistOrderByUserList(@Param("userId") Integer userId);

    List<AssistOrderResponse> findZeroStockWord(@Param("userId") Integer userId);

    HelpWorkResponse findByHelpWorkId(Integer helpWorkId);

    void updateStatusAndHelpOkById(@Param("status") int status, @Param("helpWorkId") Integer helpWorkId, @Param("productPriceKo") BigDecimal productPriceKo);

    void updateHelpWordStatus(HelpWorkResponse helpWorkResponse);

    void updateHelpWordStatu(HelpWorkResponse helpWorkResponse);

    Boolean checkNewUser(Integer userId);

    void insertUserHelp(UserHelpWork userHelpWork);

    List<FansResponse> findFans(Integer userId);

    List<TrendsResponse> findTrendsByUserId(Integer userId);

    Integer getMyIdolNum(Integer userId);

    List<FollowBankerResponse> findFollowBanker(Integer userId);

    List<HomePageProductResponse> findHomePageProduct(@Param("keyword") String keyword);

    AssistOrderResponse findHelpWordById(Integer id);

    List<FollowBankerResponse> findFollowBankerList(@Param("list") List<FollowBankerResponse> list);

    List<FollowBankerResponse> searchBanker(@Param("keyword") String keyword);

    BankerInfoResponse findBankerInfoByProductId(Integer productId);

    List<UserResultResponse> searchUser(@Param("keyword") String keyword);

    List<UserDynamicResponse> getUserDynamic(@Param("responses") List<UserResultResponse> responses);

    List<UserDynamicResponse> getUserDynamicCount(@Param("responses") List<UserResultResponse> responses);

    List<FollowBankerProductResponse> findFollowBankerProduct(@Param("bankerId") Integer bankerId);

    List<FollowBankerProductResponse> findFollowBankerProductWithStatus(@Param("bankerId") Integer bankerId, @Param("status") Byte status, @Param("findNum") Integer findNum);


    Boolean checkUserNewUser(@Param("userId") Integer userId, @Param("createTime") Date createTime);

    Boolean existsByUserIdAndHelpWorkId(@Param("userId") Integer userId, @Param("helpWorkUserId") Integer helpWorkUserId);

    void updateHelpStatus(@Param("userId") Integer userId, @Param("productId") Integer productId);

    Boolean checkUserTodayHelped(Integer userId);

    List<EvaluationProductResponse> getRecommend(Integer bankerId);

    Integer countProductNumByBankerId(Integer bankerId);

    Integer countFollowNumByBankerId(Integer bankerId);

    BankerInfoResponse findBankerInfoByBankerId(Integer bankerId);

    String findLabelJsonByProductId(@Param("productId") Integer productId);

    String findProductNameByProductId(Integer productId);

    List<HomePageProductResponse> findOrderProduct(@Param("type") Integer type);

    List<Product> findZeroProduct(@Param("soldOut") Integer soldOut);

    List<Product> findZeroProductById(@Param("specialId") Integer specialId,@Param("soldOut") Integer soldOut);

    EvaluationProductResponse findByProductId(Integer productId);

    AssistOrderResponse findHelpWordUserInfo(Integer userId);

    Integer findCompleteNumByBanderId(@Param("productId") Integer productId);

    Integer findOrderInfoStatus(@Param("id") Integer id);

    Integer findStatus(Integer userId);

    Integer getProductStockEvaluation(Integer productId);

    void updateHelpWordZeroStockStatus(@Param("id") Integer id);

    EvaluationFlow findEvaluationStatus(@Param("orderInfoId") Integer orderInfoId,@Param("userId") Integer userId);

    String findReasonByDynamicId(@Param("dynamicId") Integer dynamicId);

    Byte findProductStatus(@Param("productId") Integer productId);

    Integer countQualityProductList(@Param("bankerId") Integer bankerId, @Param("platformData") String platformData);

    Integer countZeroProductList(@Param("bankerId") Integer bankerId);

    Integer countClearProductList(@Param("bankerId") Integer bankerId, @Param("platformData") String platformData);

    List<Dynamic> queryDynamicById(Integer specialId,
                                   @Param("type") String type,
                                   @Param("fileType") String fileType,
                                   @Param("platformData") String platformData,
                                   @Param("categoryId") String categoryId);

    Integer getZeroEvaluation();

    Integer userHelpRequestList(UserHelpRequest userHelpRequest);

    int userHelpRequest(UserHelpRequest userHelpRequest);

    Integer userHelpa(UserHelpRequest userHelpRequest);

    int insertUserHelps(UserHelpRequest userHelpRequest);

    HelpWork selectHelps(Integer helpWorkId);

    HelpWork selectHelpId(Integer helpWorkId);
}
